<template>
  <div class="query-time hot-pic-query">
    <ul>
      <li
        v-for="(item,index) in content"
        :key="(item,index)"
        :class="{'active':num==(index)}"
        class="clearfix"
        @click="queryTimeData(index)">
        <p class="fl">{{ item.name }}</p>
        <p class="fl"/>
      </li>
    </ul>
  </div>
</template>
<script>
export default{
  props: {
    content: {
      type: Array,
      default: function () {
        return []
      }
    }
  },
  data () {
    return {
      num: 1
    }
  },
  methods: {
    queryTimeData (index) {
      this.num = index
      this.$emit('dataQuery', index)
    },
    changeNumVal (nums) {
      this.num = nums
    }
  }
}
</script>
